<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
	<head>
		<title>井冈山智慧社区</title>
		<%@ include file="../common/Website-list.jsp"%>	
		<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="<%=bpath%>pages/WebSitePc/css/asynPage.css"/>		
		<script type="text/javascript" src="<%=bpath%>pages/WebSitePc/js/asynPage.js"></script>
		
		<script type="text/javascript" src="<%=bpath%>Scripts/jquery/jquery.textSearch-1.0.js"></script>
		
		<script type="text/javascript">
			$(function(){							
				$("#keywords").val('${data.title}');
				
				var params = "title=${data.title}";
		    	var pageUrl=$ctx+'/SiteIndex/queryArticlePage.json';				
		    	$("#paging").asynPage(pageUrl,params,".articlePage",buildArticleHtml,15,"rows","total");	
		    	
		    	
		    	
			});		
			
			//异步分页--创建文章列表
			function buildArticleHtml(data){					    	
				if(data!=null && data.length>0){		    		
					var articleList='<ol>';					    	
					$.each(data,function(idx,obj){		    			
						var maxwidth=55; 
						if(obj.title.length>maxwidth){
							obj.title=obj.title.substring(0,maxwidth);
							obj.title+=' ...'; 
						}	       
						var url=$ctx+'SiteIndex/article.htm?id='+encode64((obj.id).toString())+"&parNav="+$olda.replace(/#nav/g, "");
						
						var addhtml = '<li><a target="_blank" style="color:'+obj.titleColor+'" href="'+url+'">'+obj.title+'</a>'+
									      '<lable class="date">'+new Date(obj.modifyDate).format("yyyy-MM-dd")+'</lable>'+
								      '</li>';
						articleList+=addhtml;	    
					});		    		
					articleList+='</ol>';		
					$(".articlePage").append(articleList);	
					
					$(".articlePage").textSearch('${data.title}'); // 高亮显示关键字
					
				}else{
					$(".articlePage").append('没有符合条件的数据!');
				}			
			}
			
		</script>
		
		<style>
		.articlePage ol {
		    margin: 25px 25px 25px 50px;		    
		}
		.articlePage ol li{  
			list-style-type: decimal;
		    font-size: 14px !important;
		    font-weight: normal;
		    height: 40px;
		    line-height: 40px;
		    position: relative;
		    text-align: left;
		    width: 100% !important;
		    border-bottom: 1px dashed #e0e0e0;   
		}
	   .articlePage ol li a {
		    display: block;
		    height: 40px;
		    line-height: 40px;
		    overflow: hidden;
		    width: 700px !important;
		}
		.articlePage ol li lable{
		    color: #999;
		    display: block;		   
		    height: 40px;
		    line-height: 40px;
		    position: absolute;
		    right: 0;
		    text-align: right;
		    top: 0;
		    width: 80px !important;
		}		
		</style>
	</head>
<body>
	<!--Header Holder-->
	<jsp:include page="../WebSitePc/heads.jsp" />
	<!--main start-->	
	<div class="main">
		<div class="cate01">
			<div class="crumbs">
				您现在位置：<a href="<%=basePath%>" target="_self">首页</a> &gt;
				全文检索
			</div>			
			<div class="cebox"> 			
				<!-- 最后一级  类目 文章列表 分页 -->					
				<div class="pageList">
					<div class="articlePage"></div>
					<div id="paging" class="page"></div>				
			    </div>
			</div>		
		</div>		
		<div class="clear"> </div>			
	</div>
	<!--foot start-->
	<jsp:include page="../WebSitePc/footer.jsp" />	
</body>
</html>